<%@ page contentType="text/html; charset=UTF-8" %>
<!-- 引入JSTL标签库 -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8" />
	<title>Spring Boot AOP在省级安全生产管理系统的应用</title>
	<!-- 新 Bootstrap 核心 CSS 文件 -->
	<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
	<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
	<script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
	<!-- 自定义CSS文件 -->
	<c:set var="resourcesPath" value="${pageContext.request.contextPath}"></c:set>
	<link href="${resourcesPath}/jsp/assets/css/staffManageStyle.css" rel="stylesheet" />
	<link href="${resourcesPath}/jsp/assets/css/staffChangeStyle.css" rel="stylesheet" />
</head>

<body style="background-image: url(${resourcesPath}/jsp/assets/img/背景图片.jpg);background-size: 100%">
<!--菜单-->
<%@include file="../管理员header.jsp" %>

<div class="col-md-* col-sm-*">
	<div class="panel panel-default">
		<div class="panel-body">
			<!--标签头-->
			<div class="row col-xs-1">
				<ul class="nav nav-pills nav-stacked ">
					<li class="">
						<a href="javascript:void(0);" onclick="show(0)">
							新建
						</a>
					</li>
				</ul>
			</div>

			<div class="col-xs-7">
				<div class="tab-content">
					<!--新增任务-->
					<div class="tab-pane fade active in" id="addTask-pills">
						<h4 id="h4-addTask">修改</h4>
						<form name="addFrm" action="${pageContext.request.contextPath }/standardization/update" method="post" onsubmit="return check(this)">
							<div class="table-c">
								<table class="table table-striped table-bordered table-hover">
									<tr>
										<td><input type="hidden" name="id"  value="${standardizationtable.id}" ></td>
										<td><input type="hidden" name="id"  value="${resourcedemand.id}" ></td>
										<td><input type="hidden" name="id"  value="${resourcedemand.standard}" ></td>
									</tr>
									<tr>
									<td> 危险源类型 </td>
									<td><input type="text" name="hazardtype" value="${standardizationtable.hazardtype}" required></td>
									<td> 所需资源 </td>
									</tr>
									<tr>
										<td> 预警数值 </td>
										<td><input type="text" name="warningvalue" value="${standardizationtable.warningvalue}"></td>
										<td><input type="text" name="warning" value="${resourcedemand.warning}"></td>
									</tr>
									<tr>
										<td> 一级数值 </td>
										<td><input type="text" name="level1value" value="${standardizationtable.level1value}"></td>
										<td><input type="text" name="warning" value="${resourcedemand.level1}"></td>
									</tr>
									<tr>
										<td> 二级数值 </td>
										<td><input type="text" name="level2value" value="${standardizationtable.level2value}"></td>
										<td><input type="text" name="warning" value="${resourcedemand.level2}"></td>
									</tr>
									<tr>
										<td> 三级数值 </td>
										<td><input type="text" name="level3value" value="${standardizationtable.level3value}"></td>
										<td><input type="text" name="warning" value="${resourcedemand.level3}"></td>
									</tr>
									<!-- 当点击提交按钮时，请求会发送到form标签的action所指的服务端的程序中 -->
									<tr>
										<td colspan="1">
											<button id="sumit" onclick="summitfun()" type="submit" class="btn btn-default" onmouseover="this.style.backgroundColor='orange';" onmouseout="this.style.backgroundColor='';">
												提交
											</button>
										</td>
										<td>
											<button id="cancel" onclick="cancelfun()" type="submit" class="btn btn-default" onmouseover="this.style.backgroundColor='orange';" onmouseout="this.style.backgroundColor='';">
												取消
											</button>
										</td>
									</tr>
								</table>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
<script type="text/javascript">
	function show(id){
		location.href = "${pageContext.request.contextPath }/standardization/show?id=" + id;
	}
	var summit=0;
	function check(form){
		if(summit==1){
			return ture;
		}else{
			//点击了取消
			return false;
		}
	}
	function summitfun(){
		summit=1;
	}
	function cancelfun(){
		location.href = "${pageContext.request.contextPath }/standardization/list";
	}
</script>
</html>